package com.leha.mp.core.services.imp;

import com.leha.mp.core.dao.PlFileRecordMapper;
import com.leha.mp.core.entity.mybatis.PlFileRecord;
import com.leha.mp.core.services.UtilsHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UtilsHelperImpl implements UtilsHelper {
    @Autowired
    PlFileRecordMapper fileRecordMapper;

    @Override
    public void SaveFile(Integer id, String url, Integer type, Boolean isUser) {
        PlFileRecord rc = new PlFileRecord();
        if(isUser) {
        rc.setUserId(id);
    } else {
        rc.setDoctorId(id);
    }
        rc.setType(type);
        rc.setUrl(url);
        fileRecordMapper.insertSelective(rc);
}
}
